package com.moxiao.yfjh.module.blind.common;

import com.moxiao.yfjh.framework.dict.core.util.DictFrameworkUtils;
import com.moxiao.yfjh.module.blind.controller.admin.member.vo.BlindMemberUserRespVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Objects;


/**
 * @version 1.0
 * @Author zhk
 * @Date 2024/1/24 10:39
 **/
@Service
public class SysDictEnumUtil {

    /**
     * 补充枚举相关信息
     * @param blindMemberUserRespVO
     */
    public void suppleNameDict(BlindMemberUserRespVO blindMemberUserRespVO){
        if (Objects.nonNull(blindMemberUserRespVO.getSex())){
            blindMemberUserRespVO.setSexName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.USER_SEX, blindMemberUserRespVO.getSex().intValue()));
        }
        if (Objects.nonNull(blindMemberUserRespVO.getMatchAge())){
            blindMemberUserRespVO.setMatchAgeName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.MATCH_AGE, blindMemberUserRespVO.getMatchAge()));
        }
        if (Objects.nonNull(blindMemberUserRespVO.getMatchDrink())){
            blindMemberUserRespVO.setMatchDrinkName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.HAVE_DRINK, blindMemberUserRespVO.getMatchDrink().intValue()));
        }
        if (Objects.nonNull(blindMemberUserRespVO.getMatchSmoker())){
            blindMemberUserRespVO.setMatchSmokerName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.HAVA_SMOK, blindMemberUserRespVO.getMatchSmoker().intValue()));
        }
        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getConstellation())){
            blindMemberUserRespVO.setConstellationName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.CONSTELLATION, blindMemberUserRespVO.getConstellation()));
        }
        if (Objects.nonNull(blindMemberUserRespVO.getDrink())){
            blindMemberUserRespVO.setDrinkName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.HAVE_DRINK, blindMemberUserRespVO.getDrink().intValue()));
        }
        if (Objects.nonNull(blindMemberUserRespVO.getSmoker())){
            blindMemberUserRespVO.setSmokerName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.HAVA_SMOK, blindMemberUserRespVO.getSmoker().intValue()));
        }
        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getMonthIncome())){
            blindMemberUserRespVO.setMonthIncomeName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.MATCH_INCOME, Integer.valueOf(blindMemberUserRespVO.getMonthIncome())));
        }
        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getMatchIncome())){
            blindMemberUserRespVO.setMatchIncomeName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.MATCH_INCOME, Integer.valueOf(blindMemberUserRespVO.getMatchIncome())));
        }
        if (Objects.nonNull(blindMemberUserRespVO.getWithChild())){
            blindMemberUserRespVO.setWithChildName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.HAVE_CHILDREN,blindMemberUserRespVO.getWithChild().intValue()));
        }
        if (Objects.nonNull(blindMemberUserRespVO.getWantChild())){
            blindMemberUserRespVO.setWantChildName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.WANT_CHILD, blindMemberUserRespVO.getWantChild().intValue()));
        }
        if (Objects.nonNull(blindMemberUserRespVO.getMatchWantChild())){
            blindMemberUserRespVO.setMatchWantChildName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.WANT_CHILD, blindMemberUserRespVO.getMatchWantChild().intValue()));
        }

        if (Objects.nonNull(blindMemberUserRespVO.getMatchWithChild())){
            blindMemberUserRespVO.setMatchWithChildName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.HAVE_CHILDREN, blindMemberUserRespVO.getMatchWithChild().intValue()));
        }

        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getMatchHeight())){
            blindMemberUserRespVO.setMatchHeightName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.MATCH_HEIGHT, Integer.valueOf(blindMemberUserRespVO.getMatchHeight())));
        }

        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getNation())){
            blindMemberUserRespVO.setNationName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.NATION, Integer.valueOf(blindMemberUserRespVO.getNation())));
        }

        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getMarryDate())){
            blindMemberUserRespVO.setWhenMarryName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.WHEN_MARRY, Integer.valueOf(blindMemberUserRespVO.getMarryDate())));
        }

        if (Objects.nonNull(blindMemberUserRespVO.getPurchasCar())){
            blindMemberUserRespVO.setPurchaseCarName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.PURCHASE_CAR, Integer.valueOf(blindMemberUserRespVO.getPurchasCar())));
        }

        if (Objects.nonNull(blindMemberUserRespVO.getPurchasHouse())){
            blindMemberUserRespVO.setPurchaseHouseName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.PURCHASE_SITUATION, Integer.valueOf(blindMemberUserRespVO.getPurchasHouse())));
        }

        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getEducation())){
            blindMemberUserRespVO.setEducationName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.USER_EDUCATION, Integer.valueOf(blindMemberUserRespVO.getEducation())));
        }

        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getMatchEducation())){
            blindMemberUserRespVO.setMatchEducationName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.USER_EDUCATION, Integer.valueOf(blindMemberUserRespVO.getMatchEducation())));
        }

        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getMarriage())){
            blindMemberUserRespVO.setMarriageName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.MARITAL_STATUS, Integer.valueOf(blindMemberUserRespVO.getMarriage())));
        }

        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getMatchMarriage())){
            blindMemberUserRespVO.setMatchMarriageName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.MARITAL_STATUS, Integer.valueOf(blindMemberUserRespVO.getMatchMarriage())));
        }
        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getAscendantConstell())) {
            blindMemberUserRespVO.setAscendantConstellName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.CONSTELLATION, Integer.valueOf(blindMemberUserRespVO.getAscendantConstell())));
        }
        if (StringUtils.isNotEmpty(blindMemberUserRespVO.getMoonConstell())) {
            blindMemberUserRespVO.setMoonConstellName(DictFrameworkUtils.getDictDataLabel(BlindDictTypeConstants.CONSTELLATION, Integer.valueOf(blindMemberUserRespVO.getMoonConstell())));
        }
    }

}
